<template>
  <div class="multidiv">
    <el-row v-bind:class="{multErrorTip:errorTip}" style="margin-top: auto">
      <el-col :span="24">
        <el-input
          type="text"
          v-model="mulrenum.rnuRadioContent"
          :placeholder="label"
          @change="getMultipointsValue()"
        >
          <template slot="prepend">{{tableSetJson.label}}</template>
        </el-input>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12" v-if="tableSetJson.designModel === 'q'">
        <el-input clearable v-model="mulrenum.designValue" @change="getMultipointsDesignValue()" type="text">
          <template slot="prepend">设计值：</template>
        </el-input>
      </el-col>
<!--      <el-col :span="12" v-if="tableSetJson.designModel != 'q'&&tableSetJson.designModel != 'p'&&tableSetJson.designModel!=''">-->
<!--        <el-input clearable v-model="mulrenum.designValue" disabled @change="getMultipointsDesignValue()" type="text">-->
<!--          <template slot="prepend">设计值：</template>-->
<!--        </el-input>-->
<!--      </el-col>-->
      <el-col :span="12" v-if="tableSetJson.lowerModel === 'p'">
        <el-input clearable v-model="mulrenum.lowerCompare" @change="getMultipointsLowerValue()" type="text">
          <template slot="prepend">偏差下限变动值：</template>
        </el-input>
      </el-col>
      <el-col :span="12" v-if="tableSetJson.upperModel === 'p'">
        <el-input clearable v-model="mulrenum.upperCompare" @change="getMultipointsUpperValue()" type="text">
          <template slot="prepend">偏差上限变动值：</template>
        </el-input>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12">
        <el-input disabled v-model="tableSetJson.designValue"  type="number">
          <template slot="prepend">设计值：</template>
        </el-input>
      </el-col>
      <el-col :span="12">
        <el-input disabled clearable v-model="tableSetJson.compareValue" @change="getMultipointsValue()" type="text">
          <template slot="prepend">允许偏差：</template>
        </el-input>
      </el-col>
      <el-col :span="12">
        <el-input  disabled clearable v-model="tableSetJson.lowerCompare" @change="getMultipointsValue()" type="number">
          <template slot="prepend">偏差下限：</template>
        </el-input>
      </el-col>
      <el-col :span="12">
        <el-input disabled clearable v-model="tableSetJson.upperCompare" @change="getMultipointsValue()" type="number">
          <template slot="prepend">偏差上限：</template>
        </el-input>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="8" style="color: #ff7046;font-size: 13px;padding-left: 10px">
        <span style="padding-right:10px;" v-if="tableSetJson.compareSymbol === 'addSubtract'">比较符：+-</span>
        <span style="padding-right:10px;" v-if="tableSetJson.compareSymbol === 'gt'">比较符：&gt;=</span>
        <span style="padding-right:10px;" v-if="tableSetJson.compareSymbol === 'lt'">比较符：&lt;=</span>
        <span style="padding-right:10px;" v-if="tableSetJson.compareSymbol === 'bfh'">比较符：%</span>
      </el-col>
      <el-col :span="16" style="color: #ff7046;font-size: 13px;padding-left: 10px;float:right;">
        <span style="padding-right:10px;">共测{{mulrenum.rnuContent1}}个点，满足要求{{mulrenum.rnuContent2}}个点，合格率：{{mulrenum.rnuRadioContent1}}</span>
      </el-col>
      <el-col :span="24">
              <el-divider></el-divider>
      </el-col>
      <el-col :span="12" style="color: dodgerblue;font-size: 13px;padding: 10px">
        设计要求：{{tableSetJson.labeltip}}
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: "multipoints",
  props: {
    /* 父组件传过来的数据 */
    tableSetJson: {
      type: Object
    },
    renumin: {
      type: Object
    },
    beforeDesc: {
      type: String
    }
  },
  watch: {
    mulrenum:{
      handler(newVal, oldVal) {
        this.$emit("listenToDateInput", newVal);
      },
      deep:true
    },
    tableSetJson:{
      handler(newVal, oldVal) {
        this.tableJson = newVal;
      },
      deep:true
    },
    /*检测多测点输入数据*/
    "mulrenum.rnuRadioContent":{
      handler(val, oldVal) {
        // console.log("多测点开始变动：===>>>"+val);

        if(val=="."||val==","||val=="，"||val==""){
          this.$message.warning("请输入正确的格式!!!");
          this.mulrenum.rnuRadioContent = val.substr(0,val.length-1);
          return;
        }

        var test14 = new RegExp ("[a-zA-Z]");
        if(test14.test(val)){
          this.remiderMsg = "输入有误!!!";
          this.$message.warning(this.remiderMsg);
          this.mulrenum.rnuRadioContent = val.substr(0,val.length-1);
          return;
        }

        var test1 =  /[`~!@#$%^&*()_\+=<>?:"{}|\/;'\\[\]·~！@#￥%……&*（）——\+={}|《》？：“”【】、；‘’，。、]/im;
        if(test1.test(val)){
          this.remiderMsg = "输入格式有误!!!";
          this.$message.warning(this.remiderMsg);
          this.mulrenum.rnuRadioContent = val.substr(0,val.length-1);
          return;
        }

        this.multiPointsValue = val;
        var strArray = this.multiPointsValue.split(",");

        var test = new RegExp (",\{2\}");
        if(test.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在多个逗号)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test2 = new RegExp ("^0[0-9]");
        if(test2.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(不能存在以0开头的整数)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test3 = new RegExp ("[.][,]");
        if(test3.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在.,)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test4 = new RegExp ("[,][.]");
        if(test4.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在.,)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test5 = new RegExp ("[.][-]");
        if(test5.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在.-)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test6 = new RegExp ("[-][0-9][-]");
        if(test6.test(strArray.toString())){
          this.remiderMsg = "输入格式有误!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test7 = new RegExp ("[-][,]");
        if(test7.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在-,)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test8 = new RegExp ("[-][.]");
        if(test8.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在-.)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test9 = new RegExp ("[-][-]");
        if(test9.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(可能存在--)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test10 = new RegExp ("^[0-9][-]$");
        if(test10.test(strArray.toString())){
          this.remiderMsg = "输入格式有误(数字后不能存在-)!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test11 = new RegExp ("[-][0-9]{1,}[-]{1,}");
        if(test11.test(strArray.toString())){
          this.remiderMsg = "输入格式有误!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test12 = new RegExp ("[0-9]{1,}[-]{1,}");
        if(test12.test(strArray.toString())){
          this.remiderMsg = "输入格式有误!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }

        var test13 = new RegExp ("^[0-9|-]");
        if(!test13.test(strArray.toString())){
          this.remiderMsg = "必须以数字或者负号开头!!!";
          this.$message.warning(this.remiderMsg);
          this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
          this.mulrenum.rnuRadioContent = this.multiPointsValue;
          return;
        }



        for(var index = 0;index<strArray.length;index++){
          if(strArray[index].split(".").length-1>1){
            this.remiderMsg = "输入格式有误(可能存在多个小数点)!!!!";
            this.$message.warning(this.remiderMsg);
            this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
            this.mulrenum.rnuRadioContent = this.multiPointsValue;
            return;
          }
          if(strArray[index].split(",").length-1>1){
            this.remiderMsg = "输入格式有误(可能存在多个逗号)!!!";
            this.$message.warning(this.remiderMsg);
            this.multiPointsValue = this.multiPointsValue.substr(0,this.multiPointsValue.length-1);
            this.mulrenum.rnuRadioContent = this.multiPointsValue;
            return;
          }
        }
      }
    },
    "mulrenum.designValue": {
      handler(val, oldVal) {
        this.mulrenum.designValue = val;
        // this.getResult(this.mulrenum.rnuRadioContent);
      }
    },
    "mulrenum.compareValue": {
      handler(val, oldVal) {
        this.mulrenum.compareValue = val;
        // this.getResult(this.mulrenum.rnuRadioContent);
      }
    },
    "mulrenum.lowerCompare": {
      handler(val, oldVal) {
        this.mulrenum.lowerCompare = val;
        // this.getResult(this.mulrenum.rnuRadioContent);
      }
    },
    "mulrenum.upperCompare": {
      handler(val, oldVal) {
        this.mulrenum.upperCompare = val;
        // this.getResult(this.mulrenum.rnuRadioContent);
      }
    },
    "mulrenum.rnuContent1": {
      handler(val, oldVal) {
        this.mulrenum.rnuRadioContent1 = this.mulrenum.rnuContent2 + "/" + val;
      }
    }
  },
  data() {
    return {
      errorTip:false,
      mulrenum: this.renumin,
      label:'输入的多个值以英文状态下的逗号(,)相隔离,单位为(mm)',
      tableJson:this.tableSetJson,
      pDesignValue:"",//设计值
      pLowerValue:"", //偏差下限p值
      pUpperValue:"", //偏差上限p值
      multiPointsValue:"", //多测点的值
      remiderMsg:"", //提示信息
    }
  },
  created() {
    // console.log("传递的表样：========>>>>>>" + JSON.stringify(this.tableSetJson));
    // console.log("============>>>>>>" + JSON.stringify(this.mulrenum));
    // if(this.tableSetJson.lowerModel === 'p') {
    //   if (this.mulrenum.lowerCompare == "") {
    //     this.mulrenum.lowerCompare = "1";
    //   }
    // }
    // if(this.tableSetJson.upperModel === 'p') {
    //   if (this.mulrenum.upperCompare == "") {
    //     this.mulrenum.upperCompare = "1";
    //   }
    // }
  },

  methods: {

    /* 往父节点传值的方法 */
    getMultipointsValue() {
      // console.log("开始检测变动数据：===>>>");
      this.mulrenum.rnuCode = this.tableSetJson.name;
      this.mulrenum.rnuType = this.tableSetJson.type;
      this.mulrenum.rnuNo = this.tableSetJson.orderno;
      this.getResult(this.mulrenum.rnuRadioContent);
      this.$emit("listenToMultipoints", this.mulrenum);
    },
    setPlaceholder() {
      return this.tableSetJson.texttip;
    },

    getResult(str) {
      // console.log("筛选后的数据：===>>>"+str);
      var totalArr = this.mulrenum.rnuRadioContent.split(',');
      if (totalArr.length === 1 && totalArr[0] === "") {
        this.mulrenum.rnuContent1 = 0;
      } else {
        this.mulrenum.rnuContent1 = totalArr.length;
      }

      //设计变动值
      var designValue = "";
      if (this.tableSetJson.designModel === "q") {
        if(this.mulrenum.designValue===""){
          this.mulrenum.designValue ="0";
          designValue = this.mulrenum.designValue;
        }else{
          designValue = this.mulrenum.designValue;
        }
      } else {
        if(this.tableSetJson.designValue===""){
          this.tableSetJson.designValue = "0";
          designValue = this.tableSetJson.designValue;
        }else{
          designValue = this.tableSetJson.designValue;
        }
      }

      /*上限变动值*/
      var upperValue ="";
      if(this.tableSetJson.upperModel==="p"){
        if(this.mulrenum.upperCompare===""){
          this.mulrenum.upperCompare = "1";
          upperValue = this.mulrenum.upperCompare;
        }else{
          upperValue = this.mulrenum.upperCompare;
        }
      }else{
        if(this.tableSetJson.upperCompare===""){

        }else{
          upperValue = this.tableSetJson.upperCompare;
        }
      }

      /*下限变动值*/
      var lowerValue ="";
      if(this.tableSetJson.lowerModel==="p"){
        if(this.mulrenum.lowerCompare===""){
          this.mulrenum.lowerCompare = "1";
          lowerValue = this.mulrenum.lowerCompare;
        }else{
          lowerValue = this.mulrenum.lowerCompare;
        }
      }else{
        if(this.tableSetJson.lowerCompare===""){
          // this.tableSetJson.lowerCompare ="1";
          // lowerValue = this.tableSetJson.lowerCompare;
        }else{
          lowerValue = this.tableSetJson.lowerCompare;
        }
      }

      if (this.tableSetJson.compareSymbol === 'addSubtract') {
        var b = [];
        var small;
        var max;

        /*如果存在变动下限值*/
        if(this.tableSetJson.lowerModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计下限值为空的时候，只比较设计变动上限值
          if(this.tableSetJson.lowerCompare==""){
            small = "";
          }else{
            small = parseFloat(designValue)+(parseFloat(lowerValue)*parseFloat(this.tableSetJson.lowerCompare));
          }
        }else{
          //当设计下限值为空的时候，只比较设计上限值
          if(this.tableSetJson.lowerCompare==""){
            small = "";
          }else{
            small = parseFloat(designValue)+parseFloat(this.tableSetJson.lowerCompare);
          }
        }

        /*如果存在变动上限值*/
        if(this.tableSetJson.upperModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计上限值为空的时候，只比较设计变动下限值
          if(this.tableSetJson.upperCompare==""){
            max = "";
          }else{
            max = parseFloat(designValue)+(parseFloat(upperValue)*parseFloat(this.tableSetJson.upperCompare));
          }
        }else{
          //当设计上限值为空的时候，只比较设计下限值
          if(this.tableSetJson.upperCompare==""){
            small = "";
          }else{
            small = parseFloat(designValue)+parseFloat(this.tableSetJson.upperCompare);
          }
        }

        for (var i = 0; i < totalArr.length; i++) {
          /*当设计上下限值同时存在的时候*/
          if (this.tableSetJson.upperCompare != "" && this.tableSetJson.lowerCompare != "") {
            if (max >= parseFloat(totalArr[i]) && parseFloat(totalArr[i]) >= small) {
              b.push(totalArr[i]); //合格数组
            }
          }
          /*当仅存在设计上限值时,只比较上限值*/
          if(max==""&&small!=null){
            if (max >= parseFloat(totalArr[i])) {
              b.push(totalArr[i]); //合格数组
            }
          }
          /*当仅存在设计下限值时，只比较下限值*/
          if(small==""&&max!=null){
            if (parseFloat(totalArr[i]) >= small) {
              b.push(totalArr[i]); //合格数组
            }
          }
        }
        this.mulrenum.rnuContent2 = b.length;
      }else if (this.tableSetJson.compareSymbol === 'gt') {
        var lowerCompare = "";
        var small2;
        var max2;

        /*如果存在变动下限值*/
        if(this.tableSetJson.lowerModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计下限值为空的时候，只比较设计变动上限值
          if(this.tableSetJson.lowerCompare==""){
            small2 = "";
          }else{
            small2 = parseFloat(designValue)+(parseFloat(lowerValue)*parseFloat(this.tableSetJson.lowerCompare));
          }
        }else{
          //当设计下限值为空的时候，只比较设计上限值
          if(this.tableSetJson.lowerCompare==""){
            small2 = "";
          }else{
            small2 = parseFloat(designValue)+parseFloat(this.tableSetJson.lowerCompare);
          }
        }

        /*如果存在变动上限值*/
        if(this.tableSetJson.upperModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计上限值为空的时候，只比较设计变动下限值
          if(this.tableSetJson.upperCompare==""){
            max2 = "";
          }else{
            max2 = parseFloat(designValue)+(parseFloat(upperValue)*parseFloat(this.tableSetJson.upperCompare));
          }
        }else{
          //当设计上限值为空的时候，只比较设计下限值
          if(this.tableSetJson.upperCompare==""){
            max2 = "";
          }else{
            max2 = parseFloat(designValue)+parseFloat(this.tableSetJson.upperCompare);
          }
        }

        //获取比较最大值
        var maxValue;
        if(max2!=""&&small2!=""){
          if(parseFloat(max2)>=parseFloat(small2)){
            maxValue = parseFloat(max2);
          }
          if(parseFloat(max2)<=parseFloat(small2)){
            maxValue = parseFloat(small2);
          }
        }

        var b = [];
        for (var i = 0; i < totalArr.length; i++) {
          if(max2==""){
            if (parseFloat(totalArr[i])>=parseFloat(small2)) {
              b.push(totalArr[i]);
            }
          }else if(max2!=""&&small2!=""){
            if (parseFloat(totalArr[i])>=parseFloat(maxValue)) {
              b.push(totalArr[i]);
            }
          }else if(small2==""){
            if (parseFloat(totalArr[i])>=parseFloat(max2)) {
              b.push(totalArr[i]);
            }
          }
        }
        this.mulrenum.rnuContent2 = b.length;
      }
      else if (this.tableSetJson.compareSymbol === 'lt') {
        var upperCompare = "";
        var small3;
        var max3;

        /*如果存在变动下限值*/
        if(this.tableSetJson.lowerModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计下限值为空的时候，只比较设计变动上限值
          if(this.tableSetJson.lowerCompare==""){
            small3 = "";
          }else{
            small3 = parseFloat(designValue)+(parseFloat(lowerValue)*parseFloat(this.tableSetJson.lowerCompare));
          }
        }else{
          //当设计下限值为空的时候，只比较设计上限值
          if(this.tableSetJson.lowerCompare==""){
            small3 = "";
          }else{
            small3 = parseFloat(designValue)+parseFloat(this.tableSetJson.lowerCompare);
          }
        }

        /*如果存在变动上限值*/
        if(this.tableSetJson.upperModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计上限值为空的时候，只比较设计变动下限值
          if(this.tableSetJson.upperCompare==""){
            max3 = "";
          }else{
            max3 = parseFloat(designValue)+(parseFloat(upperValue)*parseFloat(this.tableSetJson.upperCompare));
          }
        }else{
          //当设计上限值为空的时候，只比较设计下限值
          if(this.tableSetJson.upperCompare==""){
            max3 = "";
          }else{
            max3 = parseFloat(designValue)+parseFloat(this.tableSetJson.upperCompare);
          }
        }

        //获取比较最小值
        var minValue;
        if(max3!=""&&small3!=""){
          if(parseFloat(max3)<=parseFloat(small3)){
            minValue = parseFloat(max3);
          }
          if(parseFloat(max3)>=parseFloat(small3)){
            minValue = parseFloat(small3);
          }
        }

        var b = [];
        for (var i = 0; i < totalArr.length; i++) {
          if(max3==""){
            if (parseFloat(totalArr[i])<=parseFloat(small3)) {
              b.push(totalArr[i]);
            }
          }else if(max3!=""&&small3!=""){
            // console.log("最小值：===>>>"+minValue);
            // console.log("当前值：===>>>"+totalArr[i]);
            if (parseFloat(totalArr[i])<=parseFloat(minValue)) {
              b.push(totalArr[i]);
            }
          }else if(small3==""){
            if (parseFloat(totalArr[i])<=parseFloat(max3)) {
              b.push(totalArr[i]);
            }
          }
        }
        this.mulrenum.rnuContent2 = b.length;
      } else if (this.tableSetJson.compareSymbol === 'bfh') {
        var small4;
        var max4;
        var b = [];
        /*如果存在变动下限值*/
        if(this.tableSetJson.lowerModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计下限值为空的时候，只比较设计变动上限值
          if(this.tableSetJson.lowerCompare==""){
            small4 = "";
          }else{
            small4 = (parseFloat(designValue)*parseFloat(this.tableSetJson.lowerCompare))/100;
          }
        }else{
          //当设计下限值为空的时候，只比较设计上限值
          if(this.tableSetJson.lowerCompare==""){
            small4 = "";
          }else{
            small4 = (parseFloat(designValue)*parseFloat(this.tableSetJson.lowerCompare))/100;
          }
        }

        /*如果存在变动上限值*/
        if(this.tableSetJson.upperModel === 'p'){
          //变动下限值 =（设计（变动）值+（变动下限值*设计下限值）
          //当设计上限值为空的时候，只比较设计变动下限值
          if(this.tableSetJson.upperCompare==""){
            max4 = "";
          }else{
            max4 = (parseFloat(designValue)*parseFloat(this.tableSetJson.upperCompare))/100;
          }
        }else{
          //当设计上限值为空的时候，只比较设计下限值
          if(this.tableSetJson.upperCompare==""){
            max4 = "";
          }else{
            max4 = (parseFloat(designValue)*parseFloat(this.tableSetJson.upperCompare))/100;
          }
        }

        for (var i = 0; i < totalArr.length; i++) {
          if(max4==""){
            if (parseFloat(totalArr[i])>=parseFloat(small4)) {
              b.push(totalArr[i]);
            }
          }else if(max4!=""&&small4!=""){
            if (parseFloat(totalArr[i]) <= max4 && parseFloat(totalArr[i]) >= small4) {
              b.push(totalArr[i]);
            }
          }else if(small2==""){
            if (parseFloat(totalArr[i])<=parseFloat(max4)) {
              b.push(totalArr[i]);
            }
          }
        }
        this.mulrenum.rnuContent2 = b.length;
      }
      this.mulrenum.rnuRadioContent1 = this.mulrenum.rnuContent2 + "/" + this.mulrenum.rnuContent1;
    },

    /*获取设计值*/
    getMultipointsDesignValue(){
      this.pDesignValue = this.mulrenum.designValue.toString();
    },

    /*获取上限值*/
    getMultipointsUpperValue(){
      this.pUpperValue = this.mulrenum.upperCompare.toString();
    },

    /*获取下限值*/
    getMultipointsLowerValue(){
      this.pLowerValue = this.mulrenum.lowerCompare.toString();
    },

  }
};
</script>
<style>
.multidiv {
  width: 724px;
  margin-left: 5px;
  margin-top: 5px;
  margin-bottom: 5px;
  background-color: #f3f3f3;
}
.multErrorTip {
  border: 1px solid red;
  border-radius: 4px;
}
</style>


